package com.aiks.single.singlemavenproject.controller;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * NacosConfigTest.
 *
 * @author <a href="mailto:yuanz@yxt.com">yuanz</a>
 * @date 2022-02-02 12:05
 * @since 1.0.0
 **/
@RestController
@RequestMapping("/demo")
public class NacosConfigTestController {
    
    @NacosValue(value = "${test}", autoRefreshed = true)
    private String test;
    
    /**
     * NacosConfigTest.
     *
     * @return String
     */
    @GetMapping("/test")
    public String test() {
        return test;
    }
}
